﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace TFMAPI
{
    /// <summary>
    /// Class to signal an 404 exception if the user does not exist
    /// </summary>
    public class InexistentTwitterUserException : Exception 
    {
        public InexistentTwitterUserException(string message): base(message){}
    }

    /// <summary>
    /// Class to signal an 403 exception if the user has protected access to it's information (deleted account?)
    /// </summary>
    public class ProtectedUserInformationException : Exception
    {
        public ProtectedUserInformationException(string message) : base(message) { }
    }

    /// <summary>
    /// Class to signal that the current IP quota for Twitter API calls has been reached
    /// Informs of the time the quota will be available again and the maximum allowed calls per hour.
    /// </summary>
    public class QuotaExceededException : Exception 
    {

        public QuotaExceededException( DateTime nextSlot, int maxCalls)
        {
            this.NextAvailableTime = nextSlot;
            this.MaxCallsPerHour = maxCalls;
        }

        public DateTime NextAvailableTime { get; set; }
        public int MaxCallsPerHour { get; set; }
    }
}
